\hypertarget{heat1_8cpp}{
\subsection{Examples/04HeatDiffusion/heat1.cpp File Reference}
\label{heat1_8cpp}\index{Examples/04HeatDiffusion/heat1.cpp@{Examples/04HeatDiffusion/heat1.cpp}}
}


Solving the Heat difusion equation in 1D.  




\subsubsection{Detailed Description}
\begin{DoxyAuthor}{Author}
Luis M. de la Cruz Salas \mbox{[} Mon Mar 17 08:47:37 GMT 2008 \mbox{]}
\end{DoxyAuthor}
This code solves the unsteady heat diffusion equation in one dimension: $ \frac{\partial T}{\partial t} = \nabla^2 T $. This equation is solved in the interval $ x \in [0,1] $. The initial condition for the temperature is $ T = 10 \cos (3 \pi x)$, and the boundary conditions: $ T=10 $ for $ x=0 $, and $ T=-10 $ for $ x = 1 $. \begin{DoxyParagraph}{Compiling and running}
Modify the variables BASE and BLITZ in the file {\ttfamily tuna-\/cfd-\/rules.in} according to your installation and then type the next commands: \begin{DoxyVerb}
   % make
   % ./heat1  \end{DoxyVerb}
 The results are stored in {\ttfamily Data1} 
\end{DoxyParagraph}


Definition in file \hyperlink{heat1_8cpp_source}{heat1.cpp}.

